﻿<%@ Page Title="Estado de mesas" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="mesas.aspx.cs" Inherits="Restaurante.mesas" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
         <p id="titulo"> Estado de mesas</p>
    </h2>
    <div class="contTabla">
        <asp:GridView ID="gvMesas" runat="server"  CellPadding="4" 
            ForeColor="#333333" GridLines="None" Width="535px" 
            AutoGenerateColumns="False" ShowFooter="True" AllowPaging="True" 
            AllowSorting="True" DataSourceID="nesasGrilla">
            <AlternatingRowStyle BackColor="White"/>
            <Columns>
                <asp:BoundField DataField="sector" HeaderText="sector" 
                    SortExpression="sector" />
                <asp:BoundField DataField="mesa" HeaderText="mesa" SortExpression="mesa" />
                <asp:BoundField DataField="comensales" HeaderText="comensales" 
                    SortExpression="comensales" />
                <asp:BoundField DataField="estado" HeaderText="estado" 
                    SortExpression="estado" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>

        <asp:SqlDataSource ID="nesasGrilla" runat="server" 
            ConnectionString="<%$ ConnectionStrings:BarCafe %>" 
            ProviderName="<%$ ConnectionStrings:BarCafe.ProviderName %>" SelectCommand="select s.Descripcion sector,
	   m.Descripcion mesa,
	   m.Nro_Comensales comensales,
	   e.Descripcion estado
 from Sector s,
	  Mesa m,
	  Estado e
where  s.id_Sector = m.id_Sector
  and m.Id_Estado = e.Id_Estado
  order by 1
"></asp:SqlDataSource>

    </div>
    <br />
    <br />
    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" />
</asp:Content>
